From: Jasper St. Pierre Date: Tue, 4 Dec 2012 19:32:15 +0000 (-0500) Subject: grabHelper: Use focus_default_window X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5291 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4153feeb15438634addc97286480fc12827c5425;p=gnome-shell.git grabHelper: Use focus_default_window This prevents us from having to track the previously focused window. https://bugzilla.gnome.org/show_bug.cgi?id=689653 --- diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index 3623a0f66..f6b11ccdd 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -204,7 +204,6 @@ const GrabHelper = new Lang.Class({ this._grabbedFromKeynav = hadFocus; this._preGrabInputMode = global.stage_input_mode; - this._prevFocusedWindow = metaDisplay.focus_window; if (this._preGrabInputMode == Shell.StageInputMode.NONREACTIVE || this._preGrabInputMode == Shell.StageInputMode.NORMAL) { @@ -243,13 +242,7 @@ const GrabHelper = new Lang.Class({ global.set_stage_input_mode(Shell.StageInputMode.FOCUSED); } - if (this._prevFocusedWindow) { - let metaDisplay = global.screen.get_display(); - if (!metaDisplay.focus_window) { - metaDisplay.set_input_focus_window(this._prevFocusedWindow, - false, global.get_current_time()); - } - } + global.screen.focus_default_window(global.get_current_time()); }, // ignoreRelease: